{% extends "base.njk" %}

{%- set aitchonetext -%}
  {%- if titleHeading -%}
    {{- titleHeading | safe -}}
  {%- else -%}
    {{- title | safe -}}
  {%- endif -%}
{%- endset -%}
{% set aitchoneid = title | slugify %}

{% block postheader %}
  <article aria-labelledby="{{ aitchoneid }}"
           class="article"
           itemscope
           itemtype="https://schema.org/BlogPosting"
  >
    <div class="article-inner">
      {% articleHeader %}
      {% if suppressToc %}
        <main itemprop="articleBody">
          <span id="main-start"></span>
          {%- h1 aitchoneid -%}
            {%- if titleHeading -%}
              {{- aitchonetext | safe -}}
            {%- else -%}
              {{- aitchonetext -}}
            {%- endif -%}
          {%- endh1 -%}
          {{- content | safe -}}
        </main>
      {% else %}
        {% toc tocDetails %}
          <main itemprop="articleBody">
            <span id="main-start"></span>
            {%- h1 aitchoneid -%}
              {%- if titleHeading -%}
                {{- aitchonetext | safe -}}
              {%- else -%}
                {{- aitchonetext -}}
              {%- endif -%}
            {%- endh1 -%}
            {{- content | safe -}}
          </main>
        {% endtoc %}
      {% endif %}
    </div>
  </article>
{% endblock %}
